'use client';
import { useState } from "react";

export default function Layout(props) {
  const [show, setShow] = useState(false);
  return (
    <div>
      <div className="bg-amber-400 rounded p-1 cursor-pointer w-20 text-center" onClick={() => setShow(!show)}>切换显示</div>
      {show ? props.one : props.two}
    </div>
  );
}
